package com.kingdee.pda.adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.kingdee.pda.R;
import com.kingdee.pda.entity.ReplenishOrderDetailBean;
import com.kingdee.pda.entity.ReplenishOrderDetailBean.DataBean.ItemsBean;
import com.kingdee.pda.util.ViewHolder;

/**
 * 补货单SKU上架建议明细适配器
 * Created by dlj
 * DATE 2021/6/25
 * TIME 16:24
 */
public class ReplenishSkuGroundingDetailAdapter extends AbsBaseAdapter<ReplenishOrderDetailBean.DataBean.PutawaysBean> {

    public ReplenishSkuGroundingDetailAdapter(Context context) {
        super(context);
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        if (convertView == null) {
            convertView = inflater.inflate(R.layout.adapter_item_three_textview, null);
        }
        TextView tv1 = ViewHolder.get(convertView, R.id.tv1);
        TextView tv2 = ViewHolder.get(convertView, R.id.tv2);
        TextView tv3 = ViewHolder.get(convertView, R.id.tv3);

        try {
            ReplenishOrderDetailBean.DataBean.PutawaysBean putawaysBean = getData().get(position);
            tv1.setText(putawaysBean.getWarehouseAreaName());
            tv2.setText(putawaysBean.getLocationName());
            tv3.setText(putawaysBean.getQty() + "");
        } catch (Exception e) {
            e.printStackTrace();
        }
        return convertView;
    }
}
